package com.bzg.spi;

import com.bzg.spi.serviceload.MyService;

import java.util.Iterator;
import java.util.ServiceLoader;

public class SPI {
	public static void main(String[] args) {
		ServiceLoader<MyService> load = ServiceLoader.load(MyService.class);
		Iterator<MyService> iterator = load.iterator();
		while (iterator.hasNext()) {
			iterator.next();
		}
	}
}
